<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=11"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link rel="stylesheet" type="text/css" href="../styles/base.css"/>
    <link rel="stylesheet" type="text/css" href="../styles/ztree-3.5.19.css"/>
    <script type="text/javascript" src="../scripts/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../scripts/jquery.ztree.core.3.5.32.min.js"></script>
    <title>广汽丰田 IT服务报单</title>
</head>
<body>
<input id="ciId" name="ciId" class="itsf_assetId" readonly>
<input id="ciCode" name="ciCode" data-valid="资产编号" placeholder="请输入资产编号" class="ipt_296 itsf_assetCode" readonly>
<div id="treeDemo" class="ztree"></div>
<script type="text/javascript">
(function() {
    var ITSMLINK = 'https://itsmtest.gtmc.com.cn/',
        settings = {
            view: {
                selectedMulti: false
            },
            link:"https://itsmtest.gtmc.com.cn/customer/help/request/api/getConfCategory",
            async: {
                enable: true,
                url: function(treeId, treeNode) {
                    console.log("geturl", treeId, treeNode, ITSMLINK + "customer/help/request/api/getConfCategory");
                    return ITSMLINK + "customer/help/request/api/getConfCategory";
                },
                dataType: "jsonp",
                autoParam: ["id"],
            },
            callback: {
                onClick: function(event, treeId, treeNode, clickFlagNumber) {
                    $(".itsf_assetId").val(treeNode.id);
                    $(".itsf_assetCode").val(treeNode.text);
                    console.log("zclick", event, treeId, treeNode, clickFlagNumber);
                }
            }
        };
    var treeobj = $.fn.zTree.init($("#treeDemo"), settings);
    console.log(treeobj.setting);
})()
</script>
</body>
</html>